<?php
session_start();
require_once 'header.php';
function __autoload($className)
{
    require_once('class/' . $className . '.class.php');
}
$UserId=session::getuserid();
$CheckActive=database::LimitQuery('userinfo',array(
'select' => 'isactive',
'condition' => array('userid' => $UserId)
));
if($CheckActive[0]['isactive']==1)
{
	session::setsessiongroup("user");
	redirect::location("membercp.php");
}
else if($CheckActive[0]['isactive']==0)
{
	redirect::location("activepages.php");
}
else
{
	$_SESSION["erro"]="You do not have permission to visit here";
	redirect::location("index.php");
}
?>